package novel.factory;

import novel.enums.NovelSpiderEnum;
import novel.impl.chapter.DefaultChapterSpider;
import novel.intrerfaces.IchapterSpider;

/**
 * @Author:xdw
 * @Date:Created in 上午 10:482019/3/12 0012
 * @described: 章节工厂类
 * @Modified By:
 */
public final class ChapterSpiderFactory {

    private ChapterSpiderFactory() {
    }

    ;

    public static IchapterSpider getChapterSpider(String url) {
        IchapterSpider chapterSpider = null;

        NovelSpiderEnum novelSpiderEnum = NovelSpiderEnum.getEnumByUrl(url);
        switch (novelSpiderEnum) {
            case BI_QU_GE:
            case DING_DIAN_WX:
            case QU_GE:
                chapterSpider = new DefaultChapterSpider();
                break;
        }

        return chapterSpider;
    }


}
